package com.xky.microserviceconsumermovie.service;

import com.xky.microserviceconsumermovie.domain.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author keying.xia
 * @date 2017/12/14
 */
@FeignClient(value = "microservice-provider-user")
public interface UserFeignClient {

    /**
     * GetMapping feign不支持
     * @PathVariable feigin中需要指定参数
     * @param id
     * @return
     */
    @RequestMapping(value = "/simple/{id}",method = RequestMethod.GET)
    public User findById(@PathVariable("id") Long id);

    /**
     * 使用feigin时，用get请求携带复杂对象，即使指定了get方式，最终还是会以Post请求发送
     */


}
